//
//  AppDelegate.m
//  Created on 2024/5/11.
//

#import "AppDelegate.h"
#import "ZZXDecryptVC.h"

@interface AppDelegate ()

@property (nonatomic,strong) NSWindow *window;

@end

@implementation AppDelegate

- (void)applicationDidFinishLaunching:(NSNotification *)aNotification {
    // Insert code here to initialize your application
    
    
    //窗口 关闭，缩小，放大等功能，根据需求自行组合
    NSUInteger style =  NSWindowStyleMaskTitled | NSWindowStyleMaskClosable |NSWindowStyleMaskMiniaturizable | NSWindowStyleMaskResizable;
    float w = [[NSScreen mainScreen] frame].size.width/2;
    float h = [[NSScreen mainScreen] frame].size.height/2;
    self.window = [[NSWindow alloc] initWithContentRect:NSMakeRect(0, 0, w, h) styleMask:style backing:NSBackingStoreBuffered defer:YES];
    
    ZZXDecryptVC *vc = [[ZZXDecryptVC alloc] init];
    self.window.contentViewController = vc;
    
    self.window.title = @"Terminal";
    [self.window makeKeyAndOrderFront:self];
    [self.window center];
    
}


- (void)applicationWillTerminate:(NSNotification *)aNotification {
    // Insert code here to tear down your application
}


- (BOOL)applicationSupportsSecureRestorableState:(NSApplication *)app {
    return YES;
}


@end
